<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/12/29 0029
  Time: 17:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>实时显示数据库新闻信息</title>
</head>
<body>

<div>

</div>

<script src="../../RequestResponse/ReconsitutionAjax2/AjaxRequest.js"></script>

<script>

    function onerror() {
        alert("页面出错");
    }

    function execute() {
        var loader=new net.AjaxRequest("Database.jsp?nocache="+new Date().getTime(),callBack,onerror,'POST','黄彪制作');
    }

    function callBack() {
        document.getElementsByTagName('div')[0].innerHTML=this.req.responseText;
    }

    window.onload=function (ev) {
        execute();
        每个1分钟刷新新闻内容
        window.setInterval("execute()",1000*60);
    }

</script>

</body>
</html>
